<template>
	<div class="game-footer">
		<h4 v-if="isPc">使用字母键中的W,A,S,D控制数字方块的移动</h4>
		<h4 v-if="isPc">或使用方向键的上下左右来控制数字方块</h4>
		<h4 v-if="!isPc">用手指滑动屏幕来控制方块的走向</h4>
	</div>
</template>

<script>
	export default {
		name: "GameFooter",
		computed: {
			isPc() {
				let userAgentInfo = window.navigator.userAgent;
				let Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]
				let flag = true;
				for (let v = 0; v < Agents.length; v++) {
					if (userAgentInfo.indexOf(Agents[v]) !== -1) {
						flag = false;
						break;
					}
				}
				return flag;
			}
		}
	}
</script>

<style scoped>

</style>